home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / File System Manager SDK / Interfaces / FSM.a next >
Encoding:
Text File  |  1994-09-06  |  27.2 KB  |  1,020 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        FSM.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    File System Manager Software Development Kit, Thursday, September 1, 1994 2:42:17 PM
  8. ;
  9. ;     Note:        For use with Universal Interfaces 2.0a1.  ETO #15, MPW prerelease.
  10. ;                Future releases of Universal Interfaces will include this file.
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.  
  19.     IF &TYPE('__FSM__') = 'UNDEFINED' THEN
  20. __FSM__ SET 1
  21.  
  22.  
  23.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  24.     include 'Files.a'
  25.     ENDIF
  26. ;        include 'Types.a'                                            ;
  27. ;            include 'ConditionalMacros.a'                            ;
  28. ;        include 'MixedMode.a'                                        ;
  29. ;        include 'OSUtils.a'                                        ;
  30.  
  31.  
  32. ;    The new volume mount flags 
  33. volMountInteractBit                EQU        15                    ; Input to VolumeMount: If set, it's OK for the file system 
  34. volMountInteractMask            EQU        $8000                ; to perform user interaction to mount the volume 
  35. volMountChangedBit                EQU        14                    ; Output from VoumeMount: If set, the volume was mounted, but 
  36. volMountChangedMask                EQU        $4000                ; the volume mounting information record needs to be updated. 
  37. volMountFSReservedMask            EQU        $00ff                ; bits 0-7 are defined by each file system for its own use 
  38. volMountSysReservedMask            EQU        $ff00                ; bits 8-15 are reserved for Apple system use 
  39.  
  40. ;
  41. ; * The new volume mount info record
  42. VolumeMountInfoHeader     RECORD    0
  43. length                     ds.w    1                                    ; length of location data (including self) 
  44. media                     ds.l    1                                    ; type of media (must be registered with Apple) 
  45. flags                     ds.w    1                                    ; volume mount flags. Variable length data follows 
  46. sizeof                     EQU    *
  47.                         ENDR
  48.  
  49.  
  50. gestaltFSMVersion                EQU        'fsm '
  51.  
  52. ;
  53. ; * Miscellaneous file system values not in Files.h
  54. fsUsrCNID                        EQU        16                    ; First assignable directory or file number 
  55. ;    File system trap word attribute bits 
  56. kHFSBit                            EQU        9                    ; HFS call: bit 9 
  57. kHFSMask                        EQU        $0200
  58. kAsyncBit                        EQU        10                    ; Asynchronous call: bit 10 
  59. kAsyncMask                        EQU        $0400
  60.  
  61. ;
  62. ; * HFSCIProc selectCode values
  63. ; * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
  64. ; * may be set in these selectCode values.
  65. kFSMOpen                        EQU        $A000
  66. kFSMClose                        EQU        $A001
  67. kFSMRead                        EQU        $A002
  68. kFSMWrite                        EQU        $A003
  69. kFSMGetVolInfo                    EQU        $A007
  70. kFSMCreate                        EQU        $A008
  71. kFSMDelete                        EQU        $A009
  72. kFSMOpenRF                        EQU        $A00A
  73. kFSMRename                        EQU        $A00B
  74. kFSMGetFileInfo                    EQU        $A00C
  75. kFSMSetFileInfo                    EQU        $A00D
  76. kFSMUnmountVol                    EQU        $A00E
  77. kFSMMountVol                    EQU        $A00F
  78. kFSMAllocate                    EQU        $A010
  79. kFSMGetEOF                        EQU        $A011
  80. kFSMSetEOF                        EQU        $A012
  81. kFSMFlushVol                    EQU        $A013
  82. kFSMGetVol                        EQU        $A014
  83. kFSMSetVol                        EQU        $A015
  84. kFSMEject                        EQU        $A017
  85. kFSMGetFPos                        EQU        $A018
  86. kFSMOffline                        EQU        $A035
  87. kFSMSetFilLock                    EQU        $A041
  88. kFSMRstFilLock                    EQU        $A042
  89. kFSMSetFilType                    EQU        $A043
  90. kFSMSetFPos                        EQU        $A044
  91. kFSMFlushFile                    EQU        $A045
  92. ;    The File System HFSDispatch selectCodes 
  93. kFSMOpenWD                        EQU        $0001
  94. kFSMCloseWD                        EQU        $0002
  95. kFSMCatMove                        EQU        $0005
  96. kFSMDirCreate                    EQU        $0006
  97. kFSMGetWDInfo                    EQU        $0007
  98. kFSMGetFCBInfo                    EQU        $0008
  99. kFSMGetCatInfo                    EQU        $0009
  100. kFSMSetCatInfo                    EQU        $000A
  101. kFSMSetVolInfo                    EQU        $000B
  102. kFSMLockRng                        EQU        $0010
  103. kFSMUnlockRng                    EQU        $0011
  104. kFSMCreateFileIDRef                EQU        $0014
  105. kFSMDeleteFileIDRef                EQU        $0015
  106. kFSMResolveFileIDRef            EQU        $0016
  107. kFSMExchangeFiles                EQU        $0017
  108. kFSMCatSearch                    EQU        $0018
  109. kFSMOpenDF                        EQU        $001A
  110. kFSMMakeFSSpec                    EQU        $001B
  111. ;    The Desktop Manager HFSDispatch selectCodes 
  112. kFSMDTGetPath                    EQU        $0020
  113. kFSMDTCloseDown                    EQU        $0021
  114. kFSMDTAddIcon                    EQU        $0022
  115. kFSMDTGetIcon                    EQU        $0023
  116. kFSMDTGetIconInfo                EQU        $0024
  117. kFSMDTAddAPPL                    EQU        $0025
  118. kFSMDTRemoveAPPL                EQU        $0026
  119. kFSMDTGetAPPL                    EQU        $0027
  120. kFSMDTSetComment                EQU        $0028
  121. kFSMDTRemoveComment                EQU        $0029
  122. kFSMDTGetComment                EQU        $002A
  123. kFSMDTFlush                        EQU        $002B
  124. kFSMDTReset                        EQU        $002C
  125. kFSMDTGetInfo                    EQU        $002D
  126. kFSMDTOpenInform                EQU        $002E
  127. kFSMDTDelete                    EQU        $002F
  128. ;    The AppleShare HFSDispatch selectCodes 
  129. kFSMGetVolParms                    EQU        $0030
  130. kFSMGetLogInInfo                EQU        $0031
  131. kFSMGetDirAccess                EQU        $0032
  132. kFSMSetDirAccess                EQU        $0033
  133. kFSMMapID                        EQU        $0034
  134. kFSMMapName                        EQU        $0035
  135. kFSMCopyFile                    EQU        $0036
  136. kFSMMoveRename                    EQU        $0037
  137. kFSMOpenDeny                    EQU        $0038
  138. kFSMOpenRFDeny                    EQU        $0039
  139. kFSMGetXCatInfo                    EQU        $003A
  140. kFSMGetVolMountInfoSize            EQU        $003F
  141. kFSMGetVolMountInfo                EQU        $0040
  142. kFSMVolumeMount                    EQU        $0041
  143. kFSMShare                        EQU        $0042
  144. kFSMUnShare                        EQU        $0043
  145. kFSMGetUGEntry                    EQU        $0044
  146. kFSMGetForeignPrivs                EQU        $0060
  147. kFSMSetForeignPrivs                EQU        $0061
  148.  
  149. ;
  150. ; * UTDetermineVol status values
  151. dtmvError                        EQU        0                    ; param error 
  152. dtmvFullPathame                    EQU        1                    ; determined by full pathname 
  153. dtmvVRefNum                        EQU        2                    ; determined by volume refNum 
  154. dtmvWDRefNum                    EQU        3                    ; determined by working directory refNum 
  155. dtmvDriveNum                    EQU        4                    ; determined by drive number 
  156. dtmvDefault                        EQU        5                    ; determined by default volume 
  157.  
  158. ;
  159. ; * UTGetBlock options
  160. gbDefault                        EQU        0                    ; default value - read if not found 
  161. ;    bits and masks 
  162. gbReadBit                        EQU        0                    ; read block from disk (forced read) 
  163. gbReadMask                        EQU        $0001
  164. gbExistBit                        EQU        1                    ; get existing cache block 
  165. gbExistMask                        EQU        $0002
  166. gbNoReadBit                        EQU        2                    ; don't read block from disk if not found in cache 
  167. gbNoReadMask                    EQU        $0004
  168. gbReleaseBit                    EQU        3                    ; release block immediately after GetBlock 
  169. gbReleaseMask                    EQU        $0008
  170.  
  171. ;
  172. ; * UTReleaseBlock options
  173. rbDefault                        EQU        0                    ; default value - just mark the buffer not in-use 
  174. ;    bits and masks 
  175. rbWriteBit                        EQU        0                    ; force write buffer to disk 
  176. rbWriteMask                        EQU        $0001
  177. rbTrashBit                        EQU        1                    ; trash buffer contents after release 
  178. rbTrashMask                        EQU        $0002
  179. rbDirtyBit                        EQU        2                    ; mark buffer dirty 
  180. rbDirtyMask                        EQU        $0004
  181. rbFreeBit                        EQU        3                    ; free the buffer (save in the hash) 
  182. ;
  183. ; *    rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache;
  184. ; *    on >= System 7.0, rbfreeMask overrides rbTrash
  185. rbFreeMask                        EQU        $000A
  186.  
  187. ;
  188. ; * UTFlushCache options
  189. fcDefault                        EQU        0                    ; default value - just flush any dirty buffers 
  190. ;    bits and masks 
  191. fcTrashBit                        EQU        1                    ; trash buffers after flushing 
  192. fcTrashMask                        EQU        $0002
  193. fcFreeBit                        EQU        3                    ; free buffers after flushing 
  194. fcFreeMask                        EQU        $0008                ; fcFreeMask works as fcTrash on < System 7.0 RamCache 
  195.  
  196. ;
  197. ; * UTCacheReadIP and UTCacheWriteIP cacheOption
  198. noCacheBit                        EQU        5                    ; don't cache this please 
  199. noCacheMask                        EQU        $0020
  200. rdVerifyBit                        EQU        6                    ; read verify 
  201. rdVerifyMask                    EQU        $0040
  202.  
  203. ;
  204. ; * Cache routine internal error codes
  205. chNoBuf                            EQU        1                    ; no free cache buffers (all in use) 
  206. chInUse                            EQU        2                    ; requested block in use 
  207. chnotfound                        EQU        3                    ; requested block not found 
  208. chNotInUse                        EQU        4                    ; block being released was not in use 
  209.  
  210. ;
  211. ; * FCBRec.fcbFlags bits
  212. fcbWriteBit                        EQU        0                    ; Data can be written to this file 
  213. fcbWriteMask                    EQU        $01
  214. fcbResourceBit                    EQU        1                    ; This file is a resource fork 
  215. fcbResourceMask                    EQU        $02
  216. fcbWriteLockedBit                EQU        2                    ; File has a locked byte range 
  217. fcbWriteLockedMask                EQU        $04
  218. fcbSharedWriteBit                EQU        4                    ; File is open for shared write access 
  219. fcbSharedWriteMask                EQU        $10
  220. fcbFileLockedBit                EQU        5                    ; File is locked (write-protected) 
  221. fcbFileLockedMask                EQU        $20
  222. fcbOwnClumpBit                    EQU        6                    ; File has clump size specified in FCB 
  223. fcbOwnClumpMask                    EQU        $40
  224. fcbModifiedBit                    EQU        7                    ; File has changed since it was last flushed 
  225. fcbModifiedMask                    EQU        $80
  226.  
  227. ;
  228. ; * ExtFileProc options
  229. extendFileAllBit                EQU        0                    ; allocate all requested bytes or none 
  230. extendFileAllMask                EQU        $0001
  231. extendFileContigBit                EQU        1                    ; force contiguous allocation 
  232. extendFileContigMask            EQU        $0002
  233.  
  234. ;
  235. ; *    HFS Component Interface constants
  236. ;
  237. ; * compInterfMask bits specific to HFS component
  238. hfsCIDoesHFSBit                    EQU        23                    ; set if file system supports HFS calls 
  239. hfsCIDoesHFSMask                EQU        $00800000
  240. hfsCIDoesAppleShareBit            EQU        22                    ; set if AppleShare calls supported 
  241. hfsCIDoesAppleShareMask            EQU        $00400000
  242. hfsCIDoesDeskTopBit                EQU        21                    ; set if Desktop Database calls supported 
  243. hfsCIDoesDeskTopMask            EQU        $00200000
  244. hfsCIDoesDynamicLoadBit            EQU        20                    ; set if dynamically loading code resource 
  245. hfsCIDoesDynamicLoadMask        EQU        $00100000            ;        supported 
  246. hfsCIResourceLoadedBit            EQU        19                    ; set if code resource already loaded 
  247. hfsCIResourceLoadedMask            EQU        $00080000
  248. hfsCIHasHLL2PProcBit            EQU        18                    ; set if FFS' log2PhyProc and Extendfile proc 
  249. hfsCIHasHLL2PProcMask            EQU        $00040000            ; is written in a high level language. (i.e., uses Pascal calling convention) 
  250.  
  251. ;
  252. ; *    Disk Initialization Component Interface constants
  253. ;
  254. ; * compInterfMask bits specific to Disk Initialization component
  255. diCIHasExtFormatParamsBit        EQU        18                    ; set if file system needs extended format 
  256. diCIHasExtFormatParamsMask        EQU        $00040000            ;        parameters 
  257. diCIHasMultiVolTypesBit            EQU        17                    ; set if file system supports more than one 
  258. diCIHasMultiVolTypesMask        EQU        $00020000            ;        volume type 
  259. diCIDoesSparingBit                EQU        16                    ; set if file system supports disk sparing 
  260. diCIDoesSparingMask                EQU        $00010000
  261. diCILiveBit                        EQU        0                    ; set if file system is candidate for current 
  262. diCILiveMask                    EQU        $00000001            ;        formatting operation (set by PACK2) 
  263.  
  264. ;
  265. ; * Disk Initialization Component Function selectors
  266. diCILoad                        EQU        1                    ; Make initialization code memory resident 
  267. diCIUnload                        EQU        2                    ; Make initialization code purgeable 
  268. diCIEvaluateSizeChoices            EQU        3                    ; Evaluate size choices 
  269. diCIExtendedZero                EQU        4                    ; Write an empty volume directory 
  270. diCIValidateVolName                EQU        5                    ; Validate volume name 
  271. diCIGetVolTypeInfo                EQU        6                    ; get volume type info 
  272. diCIGetFormatString                EQU        7                    ; get dialog format string 
  273. diCIGetExtFormatParams            EQU        8                    ; get extended format parameters 
  274. diCIGetDefectList                EQU        9                    ; return the defect list for the indicated disk - reserved for future use 
  275.  
  276. ;
  277. ; * Constants used in the DICIEvaluateSizeRec and FormatListRec
  278. diCIFmtListMax                    EQU        8                    ; maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries 
  279. ;    bits in FormatListRec.formatFlags: 
  280. diCIFmtFlagsValidBit            EQU        7                    ; set if sec, side, tracks valid 
  281. diCIFmtFlagsValidMask            EQU        $80
  282. diCIFmtFlagsCurrentBit            EQU        6                    ; set if current disk has this fmt 
  283. diCIFmtFlagsCurrentMask            EQU        $40
  284. ;    bits in FormatListRec.sizeListFlags: 
  285. diCISizeListOKBit                EQU        15                    ; set if this disk size usable 
  286. diCISizeListOKMask                EQU        $8000
  287.  
  288. ;
  289. ; * DICIGetFormatStringRec.stringKind format strings
  290. diCIAlternateFormatStr            EQU        1                    ; get alternate format  string (Balloon Help) 
  291. diCISizePresentationStr            EQU        2                    ; get size presentation string (for dialog) 
  292.  
  293. ;
  294. ; * Error codes returned by Disk Sparing
  295. diCIUserCancelErr                EQU        1                    ; user cancelled the disk init 
  296. diCICriticalSectorBadErr        EQU        20                    ; critical sectors are bad (hopeless)    
  297. diCISparingFailedErr            EQU        21                    ; disk cannot be spared 
  298. diCITooManyBadSectorsErr        EQU        22                    ; too many bad sectors 
  299. diCIUnknownVolTypeErr            EQU        23                    ; the volume type passed in diCIExtendedZero paramBlock is not supported 
  300. diCIVolSizeMismatchErr            EQU        24                    ; specified volume size doesn’t match with formatted disk size 
  301. diCIUnknownDICallErr            EQU        25                    ; bogus DI function call selector 
  302. diCINoSparingErr                EQU        26                    ; disk is bad but the target FS doesn't do disk sparing 
  303. diCINoExtendInfoErr                EQU        27                    ; missing file system specific extra parameter in diCIExtendedZero call 
  304. diCINoMessageTextErr            EQU        28                    ; missing message text in DIReformat call 
  305.  
  306. ;
  307. ; *    File System Manager constants
  308. ;
  309. ; * Miscellaneous constants used by FSM
  310. fsdVersion1                        EQU        1                    ; current version of FSD record 
  311. fsmIgnoreFSID                    EQU        $fffe                ; this FSID should be ignored by the driver 
  312. fsmGenericFSID                    EQU        $ffff                ; unknown foreign file system ID 
  313.  
  314. ;
  315. ; * compInterfMask bits common to all FSM components
  316. fsmComponentEnableBit            EQU        31                    ; set if FSM component interface is enabled 
  317. fsmComponentEnableMask            EQU        $80000000
  318. fsmComponentBusyBit                EQU        30                    ; set if FSM component interface is busy 
  319. fsmComponentBusyMask            EQU        $40000000
  320.  
  321. ;
  322. ; * Selectors for GetFSInfo
  323. fsmGetFSInfoByIndex                EQU        -1                    ; get fs info by index 
  324. fsmGetFSInfoByFSID                EQU        0                    ; get fs info by FSID 
  325. fsmGetFSInfoByRefNum            EQU        1                    ; get fs info by file/vol refnum 
  326.  
  327. ;
  328. ; * InformFSM messages
  329. fsmNopMessage                    EQU        0                    ; nop 
  330. fsmDrvQElChangedMessage            EQU        1                    ; DQE has changed 
  331. fsmGetFSIconMessage                EQU        2                    ; Get FFS's disk icon 
  332.  
  333. ;
  334. ; * Messages passed to the fileSystemCommProc
  335. ffsNopMessage                    EQU        0                    ; nop, should always return noErr 
  336. ffsGetIconMessage                EQU        1                    ; return disk icon and mask 
  337. ffsIDDiskMessage                EQU        2                    ; identify the about-to-be-mounted volume 
  338. ffsLoadMessage                    EQU        3                    ; load in the FFS 
  339. ffsUnloadMessage                EQU        4                    ; unload the FFS 
  340. ffsIDVolMountMessage            EQU        5                    ; identify a VolMountInfo record 
  341. ffsInformMessage                EQU        6                    ; FFS defined message 
  342. ffsGetIconInfoMessage            EQU        7
  343.  
  344. ;
  345. ; * Error codes from FSM functions
  346. fsmFFSNotFoundErr                EQU        -431                ; Foreign File system does not exist - new Pack2 could return this error too 
  347. fsmBusyFFSErr                    EQU        -432                ; File system is busy, cannot be removed 
  348. fsmBadFFSNameErr                EQU        -433                ; Name length not 1 <= length <= 31 
  349. fsmBadFSDLenErr                    EQU        -434                ; FSD size incompatible with current FSM vers 
  350. fsmDuplicateFSIDErr                EQU        -435                ; FSID already exists on InstallFS 
  351. fsmBadFSDVersionErr                EQU        -436                ; FSM version incompatible with FSD 
  352. fsmNoAlternateStackErr            EQU        -437                ; no alternate stack for HFS CI 
  353. fsmUnknownFSMMessageErr            EQU        -438                ; unknown message passed to FSM 
  354.  
  355. ;
  356. ; *    HFS Utility routine records
  357. ;
  358. ; * record used by UTGetPathComponentName
  359. ParsePathRec             RECORD    0
  360. namePtr                     ds.l    1                                    ; pathname to parse 
  361. startOffset                 ds.w    1                                    ; where to start parsing 
  362. componentLength             ds.w    1                                    ; the length of the pathname component parsed 
  363. moreName                 ds.b    1                                    ; non-zero if there are more components after this one 
  364. foundDelimiter             ds.b    1                                    ; non-zero if parsing stopped because a colon (:) delimiter was found 
  365. sizeof                     EQU    *
  366.                         ENDR
  367.  
  368. WDCBRec                 RECORD    0
  369. wdVCBPtr                 ds.l    1                                    ; Pointer to VCB of this working directory 
  370. wdDirID                     ds.l    1                                    ; Directory ID number of this working directory 
  371. wdCatHint                 ds.l    1                                    ; Hint for finding this working directory 
  372. wdProcID                 ds.l    1                                    ; Process that created this working directory 
  373. sizeof                     EQU    *
  374.                         ENDR
  375.  
  376. FCBRec                     RECORD    0
  377. fcbFlNm                     ds.l    1                                    ; FCB file number. Non-zero marks FCB used 
  378. fcbFlags                 ds.b    1                                    ; FCB flags 
  379. fcbTypByt                 ds.b    1                                    ; File type byte 
  380. fcbSBlk                     ds.w    1                                    ; File start block (in alloc size blks) 
  381. fcbEOF                     ds.l    1                                    ; Logical length or EOF in bytes 
  382. fcbPLen                     ds.l    1                                    ; Physical file length in bytes 
  383. fcbCrPs                     ds.l    1                                    ; Current position within file 
  384. fcbVPtr                     ds.l    1                                    ; Pointer to the corresponding VCB 
  385. fcbBfAdr                 ds.l    1                                    ; File's buffer address 
  386. fcbFlPos                 ds.w    1                                    ; Directory block this file is in 
  387. ; FCB Extensions for HFS 
  388. fcbClmpSize                 ds.l    1                                    ; Number of bytes per clump 
  389. fcbBTCBPtr                 ds.l    1                                    ; Pointer to B*-Tree control block for file 
  390. fcbExtRec                 ds.l    3                                    ; First 3 file extents 
  391. fcbFType                 ds.l    1                                    ; File's 4 Finder Type bytes 
  392. fcbCatPos                 ds.l    1                                    ; Catalog hint for use on Close 
  393. fcbDirID                 ds.l    1                                    ; Parent Directory ID 
  394. fcbCName                 ds.l    8                                    ; CName of open file 
  395. sizeof                     EQU    *
  396.                         ENDR
  397.  
  398. ;
  399. ; *    HFS Component Interface records
  400. HFSCIRec                 RECORD    0
  401. compInterfMask             ds.l    1                                    ; component flags 
  402. compInterfProc             ds.l    1                                    ; pointer to file system call processing code 
  403. log2PhyProc                 ds.l    1                                    ; pointer to Lg2PhysProc() code 
  404. stackTop                 ds.l    1                                    ; file system stack top 
  405. stackSize                 ds.l    1                                    ; file system stack size 
  406. stackPtr                 ds.l    1                                    ; current file system stack pointer 
  407. reserved3                 ds.l    1                                    ; --reserved, must be zero-- 
  408. idSector                 ds.l    1                                    ; Sector you need to ID a local volume. For networked volumes, this must be -1 
  409. reserved2                 ds.l    1                                    ; --reserved, must be zero-- 
  410. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  411. sizeof                     EQU    *
  412.                         ENDR
  413.  
  414. ;
  415. ; *    Disk Initialization Component Interface records
  416. DICIRec                 RECORD    0
  417. compInterfMask             ds.l    1                                    ; component flags 
  418. compInterfProc             ds.l    1                                    ; pointer to call processing code 
  419. maxVolNameLength         ds.w    1                                    ; maximum length of your volume name 
  420. blockSize                 ds.w    1                                    ; your file system's block size 
  421. reserved3                 ds.l    1                                    ; --reserved, must be zero-- 
  422. reserved2                 ds.l    1                                    ; --reserved, must be zero-- 
  423. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  424. sizeof                     EQU    *
  425.                         ENDR
  426.  
  427. ;
  428. ; * FormatListRec as returned by the .Sony disk driver's
  429. ; * Return Format List status call (csCode = 6).
  430. ; * If the status call to get this list for a drive is not
  431. ; * implemented by the driver, then a list with one entry
  432. ; * is contructed from the drive queue element for the drive.
  433. FormatListRec             RECORD    0
  434. volSize                     ds.l    1                                    ; disk capacity in SECTORs 
  435. formatFlags                 ds.b    1                                    ; flags 
  436. sectorsPerTrack             ds.b    1                                    ; sectors per track side 
  437. tracks                     ds.w    1                                    ; number of tracks 
  438. sizeof                     EQU    *
  439.                         ENDR
  440.  
  441. ;
  442. ; * SizeListRec built from FormatListRecs as described above.
  443. SizeListRec             RECORD    0
  444. sizeListFlags             ds.w    1                                    ; flags as set by external file system 
  445. sizeEntry                 ds        FormatListRec                        ; disk driver format list record 
  446. sizeof                     EQU    *
  447.                         ENDR
  448.  
  449. ;
  450. ; * paramBlock for the diCIEvaluateSize call
  451. DICIEvaluateSizeRec     RECORD    0
  452. defaultSizeIndex         ds.w    1                                    ; default size for this FS 
  453. numSizeEntries             ds.w    1                                    ; number of size entries 
  454. driveNumber                 ds.w    1                                    ; drive number 
  455. sizeListPtr                 ds.l    1                                    ; ptr to size entry table 
  456. sectorSize                 ds.w    1                                    ; bytes per sector 
  457. sizeof                     EQU    *
  458.                         ENDR
  459.  
  460. ;
  461. ; * paramBlock for the diCIExtendedZero call
  462. DICIExtendedZeroRec     RECORD    0
  463. driveNumber                 ds.w    1                                    ; drive number 
  464. volNamePtr                 ds.l    1                                    ; ptr to volume name string 
  465. fsid                     ds.w    1                                    ; file system ID 
  466. volTypeSelector             ds.w    1                                    ; volume type selector, if supports more than 1 type 
  467. numDefectBlocks             ds.w    1                                    ; number of bad logical blocks 
  468. defectListSize             ds.w    1                                    ; size of the defect list buffer in bytes 
  469. defectListPtr             ds.l    1                                    ; pointer to defect list buffer 
  470. volSize                     ds.l    1                                    ; size of volume in SECTORs 
  471. sectorSize                 ds.w    1                                    ; bytes per sector 
  472. extendedInfoPtr             ds.l    1                                    ; ptr to extended info 
  473. sizeof                     EQU    *
  474.                         ENDR
  475.  
  476. ;
  477. ; * paramBlock for the diCIValidateVolName call
  478. DICIValidateVolNameRec     RECORD    0
  479. theChar                     ds.b    1                                    ; the character to validate 
  480. hasMessageBuffer         ds.b    1                                    ; false if no message 
  481. charOffset                 ds.w    1                                    ; position of the current character (first char = 1) 
  482. messageBufferPtr         ds.l    1                                    ; pointer to message buffer or nil 
  483. charByteType             ds.w    1                                    ; theChar's byte type (smSingleByte, smFirstByte, or smLastByte) 
  484. sizeof                     EQU    *
  485.                         ENDR
  486.  
  487. ;
  488. ; * paramBlock for the diCIGetVolTypeInfo call
  489. DICIGetVolTypeInfoRec     RECORD    0
  490. volSize                     ds.l    1                                    ; size of volume in SECTORs 
  491. sectorSize                 ds.w    1                                    ; bytes per sector 
  492. numVolTypes                 ds.w    1                                    ; number of volume types supported 
  493. volTypesBuffer             ds.b    132                                ; 4 string buffers 
  494. sizeof                     EQU    *
  495.                         ENDR
  496.  
  497. ;
  498. ; * paramBlock for the diCIGetFormatString call
  499. DICIGetFormatStringRec     RECORD    0
  500. volSize                     ds.l    1                                    ; volume size in SECTORs 
  501. sectorSize                 ds.w    1                                    ; sector size 
  502. volTypeSelector             ds.w    1                                    ; volume type selector 
  503. stringKind                 ds.w    1                                    ; sub-function = type of string 
  504. stringBuffer             ds.l    64                                ; string buffer 
  505. sizeof                     EQU    *
  506.                         ENDR
  507.  
  508. ;
  509. ; * paramBlock for the diCIGetExtendedFormatParams call
  510. DICIGetExtendedFormatRec RECORD    0
  511. driveNumber                 ds.w    1                                    ; drive number 
  512. volTypeSelector             ds.w    1                                    ; volume type selector or 0 
  513. volSize                     ds.l    1                                    ; size of volume in SECTORs 
  514. sectorSize                 ds.w    1                                    ; bytes per sector 
  515. fileSystemSpecPtr         ds.l    1                                    ; pointer to the foreign file system's FSSpec 
  516. extendedInfoPtr             ds.l    1                                    ; pointer to extended parameter structure 
  517. sizeof                     EQU    *
  518.                         ENDR
  519.  
  520. ;
  521. ; *    File System Manager records
  522. FSDRec                     RECORD    0
  523. fsdLink                     ds.l    1                                    ; ptr to next 
  524. fsdLength                 ds.w    1                                    ; length of this FSD in BYTES 
  525. fsdVersion                 ds.w    1                                    ; version number 
  526. fileSystemFSID             ds.w    1                                    ; file system id 
  527. fileSystemName             ds.l    8                                    ; file system name 
  528. fileSystemSpec             ds        FSSpec                                ; foreign file system's FSSpec 
  529. fileSystemGlobalsPtr     ds.l    1                                    ; ptr to file system globals 
  530. fileSystemCommProc         ds.l    1                                    ; communication proc with the FFS 
  531. reserved3                 ds.l    1                                    ; --reserved, must be zero-- 
  532. reserved2                 ds.l    1                                    ; --reserved, must be zero-- 
  533. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  534. fsdHFSCI                 ds        HFSCIRec                            ; HFS component interface    
  535. fsdDICI                     ds        DICIRec                            ; Disk Initialization component interface 
  536. sizeof                     EQU    *
  537.                         ENDR
  538.  
  539. FSMGetIconInfoRec         RECORD    0
  540. theIcon                     ds.l    32                                ; The ICN# structure 
  541. theMask                     ds.l    32                                ; The mask for the icon above 
  542. whereStr                 ds.l    64
  543. sizeof                     EQU    *
  544.                         ENDR
  545.  
  546. ;
  547. ; * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
  548. FSMGetIconRec             RECORD    0
  549. refNum                     ds.w    1                                    ; target drive num or volume refnum 
  550. iconBufferPtr             ds.l    1                                    ; pointer to icon buffer 
  551. requestSize                 ds.l    1                                    ; requested size of the icon buffer 
  552. actualSize                 ds.l    1                                    ; actual size of the icon data returned 
  553. iconType                 ds.b    1                                    ; kind of icon 
  554. isEjectable                 ds.b    1                                    ; true if the device is ejectable 
  555. driveQElemPtr             ds.l    1                                    ; pointer to DQE 
  556. fileSystemSpecPtr         ds.l    1                                    ; pointer to foreign file system's FSSpec 
  557. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  558. sizeof                     EQU    *
  559.                         ENDR
  560.  
  561. ;
  562. ; *    HFS Utility routine prototypes
  563.     IF GENERATING68K THEN
  564.         Macro
  565.         _UTAllocateFCB
  566.             moveq    #0,d0
  567.             dc.w     $A824
  568.         EndM
  569.     ELSE
  570.         IMPORT    UTAllocateFCB
  571.     ENDIF
  572.  
  573.     IF GENERATING68K THEN
  574.         Macro
  575.         _UTReleaseFCB
  576.             moveq    #1,d0
  577.             dc.w     $A824
  578.         EndM
  579.     ELSE
  580.         IMPORT    UTReleaseFCB
  581.     ENDIF
  582.  
  583.     IF GENERATING68K THEN
  584.         Macro
  585.         _UTLocateFCB
  586.             moveq    #2,d0
  587.             dc.w     $A824
  588.         EndM
  589.     ELSE
  590.         IMPORT    UTLocateFCB
  591.     ENDIF
  592.  
  593.     IF GENERATING68K THEN
  594.         Macro
  595.         _UTLocateNextFCB
  596.             moveq    #3,d0
  597.             dc.w     $A824
  598.         EndM
  599.     ELSE
  600.         IMPORT    UTLocateNextFCB
  601.     ENDIF
  602.  
  603.     IF GENERATING68K THEN
  604.         Macro
  605.         _UTIndexFCB
  606.             moveq    #4,d0
  607.             dc.w     $A824
  608.         EndM
  609.     ELSE
  610.         IMPORT    UTIndexFCB
  611.     ENDIF
  612.  
  613.     IF GENERATING68K THEN
  614.         Macro
  615.         _UTResolveFCB
  616.             moveq    #5,d0
  617.             dc.w     $A824
  618.         EndM
  619.     ELSE
  620.         IMPORT    UTResolveFCB
  621.     ENDIF
  622.  
  623.     IF GENERATING68K THEN
  624.         Macro
  625.         _UTAllocateVCB
  626.             moveq    #6,d0
  627.             dc.w     $A824
  628.         EndM
  629.     ELSE
  630.         IMPORT    UTAllocateVCB
  631.     ENDIF
  632.  
  633.     IF GENERATING68K THEN
  634.         Macro
  635.         _UTAddNewVCB
  636.             moveq    #7,d0
  637.             dc.w     $A824
  638.         EndM
  639.     ELSE
  640.         IMPORT    UTAddNewVCB
  641.     ENDIF
  642.  
  643.     IF GENERATING68K THEN
  644.         Macro
  645.         _UTDisposeVCB
  646.             moveq    #8,d0
  647.             dc.w     $A824
  648.         EndM
  649.     ELSE
  650.         IMPORT    UTDisposeVCB
  651.     ENDIF
  652.  
  653.     IF GENERATING68K THEN
  654.         Macro
  655.         _UTLocateVCBByRefNum
  656.             moveq    #9,d0
  657.             dc.w     $A824
  658.         EndM
  659.     ELSE
  660.         IMPORT    UTLocateVCBByRefNum
  661.     ENDIF
  662.  
  663.     IF GENERATING68K THEN
  664.         Macro
  665.         _UTLocateVCBByName
  666.             moveq    #10,d0
  667.             dc.w     $A824
  668.         EndM
  669.     ELSE
  670.         IMPORT    UTLocateVCBByName
  671.     ENDIF
  672.  
  673.     IF GENERATING68K THEN
  674.         Macro
  675.         _UTLocateNextVCB
  676.             moveq    #11,d0
  677.             dc.w     $A824
  678.         EndM
  679.     ELSE
  680.         IMPORT    UTLocateNextVCB
  681.     ENDIF
  682.  
  683.     IF GENERATING68K THEN
  684.         Macro
  685.         _UTAllocateWDCB
  686.             moveq    #12,d0
  687.             dc.w     $A824
  688.         EndM
  689.     ELSE
  690.         IMPORT    UTAllocateWDCB
  691.     ENDIF
  692.  
  693.     IF GENERATING68K THEN
  694.         Macro
  695.         _UTReleaseWDCB
  696.             moveq    #13,d0
  697.             dc.w     $A824
  698.         EndM
  699.     ELSE
  700.         IMPORT    UTReleaseWDCB
  701.     ENDIF
  702.  
  703.     IF GENERATING68K THEN
  704.         Macro
  705.         _UTResolveWDCB
  706.             moveq    #14,d0
  707.             dc.w     $A824
  708.         EndM
  709.     ELSE
  710.         IMPORT    UTResolveWDCB
  711.     ENDIF
  712.  
  713.     IF GENERATING68K THEN
  714.         Macro
  715.         _UTFindDrive
  716.             moveq    #15,d0
  717.             dc.w     $A824
  718.         EndM
  719.     ELSE
  720.         IMPORT    UTFindDrive
  721.     ENDIF
  722.  
  723.     IF GENERATING68K THEN
  724.         Macro
  725.         _UTAdjustEOF
  726.             moveq    #16,d0
  727.             dc.w     $A824
  728.         EndM
  729.     ELSE
  730.         IMPORT    UTAdjustEOF
  731.     ENDIF
  732.  
  733.     IF GENERATING68K THEN
  734.         Macro
  735.         _UTSetDefaultVol
  736.             moveq    #17,d0
  737.             dc.w     $A824
  738.         EndM
  739.     ELSE
  740.         IMPORT    UTSetDefaultVol
  741.     ENDIF
  742.  
  743.     IF GENERATING68K THEN
  744.         Macro
  745.         _UTGetDefaultVol
  746.             moveq    #18,d0
  747.             dc.w     $A824
  748.         EndM
  749.     ELSE
  750.         IMPORT    UTGetDefaultVol
  751.     ENDIF
  752.  
  753.     IF GENERATING68K THEN
  754.         Macro
  755.         _UTEjectVol
  756.             moveq    #43,d0
  757.             dc.w     $A824
  758.         EndM
  759.     ELSE
  760.         IMPORT    UTEjectVol
  761.     ENDIF
  762.  
  763.     IF GENERATING68K THEN
  764.         Macro
  765.         _UTCheckWDRefNum
  766.             moveq    #19,d0
  767.             dc.w     $A824
  768.         EndM
  769.     ELSE
  770.         IMPORT    UTCheckWDRefNum
  771.     ENDIF
  772.  
  773.     IF GENERATING68K THEN
  774.         Macro
  775.         _UTCheckFileRefNum
  776.             moveq    #20,d0
  777.             dc.w     $A824
  778.         EndM
  779.     ELSE
  780.         IMPORT    UTCheckFileRefNum
  781.     ENDIF
  782.  
  783.     IF GENERATING68K THEN
  784.         Macro
  785.         _UTCheckVolRefNum
  786.             moveq    #21,d0
  787.             dc.w     $A824
  788.         EndM
  789.     ELSE
  790.         IMPORT    UTCheckVolRefNum
  791.     ENDIF
  792.  
  793.     IF GENERATING68K THEN
  794.         Macro
  795.         _UTCheckPermission
  796.             moveq    #22,d0
  797.             dc.w     $A824
  798.         EndM
  799.     ELSE
  800.         IMPORT    UTCheckPermission
  801.     ENDIF
  802.  
  803.     IF GENERATING68K THEN
  804.         Macro
  805.         _UTCheckVolOffline
  806.             moveq    #23,d0
  807.             dc.w     $A824
  808.         EndM
  809.     ELSE
  810.         IMPORT    UTCheckVolOffline
  811.     ENDIF
  812.  
  813.     IF GENERATING68K THEN
  814.         Macro
  815.         _UTCheckVolModifiable
  816.             moveq    #24,d0
  817.             dc.w     $A824
  818.         EndM
  819.     ELSE
  820.         IMPORT    UTCheckVolModifiable
  821.     ENDIF
  822.  
  823.     IF GENERATING68K THEN
  824.         Macro
  825.         _UTCheckFileModifiable
  826.             moveq    #25,d0
  827.             dc.w     $A824
  828.         EndM
  829.     ELSE
  830.         IMPORT    UTCheckFileModifiable
  831.     ENDIF
  832.  
  833.     IF GENERATING68K THEN
  834.         Macro
  835.         _UTCheckDirBusy
  836.             moveq    #26,d0
  837.             dc.w     $A824
  838.         EndM
  839.     ELSE
  840.         IMPORT    UTCheckDirBusy
  841.     ENDIF
  842.  
  843.     IF GENERATING68K THEN
  844.         Macro
  845.         _UTParsePathname
  846.             moveq    #27,d0
  847.             dc.w     $A824
  848.         EndM
  849.     ELSE
  850.         IMPORT    UTParsePathname
  851.     ENDIF
  852.  
  853.     IF GENERATING68K THEN
  854.         Macro
  855.         _UTGetPathComponentName
  856.             moveq    #28,d0
  857.             dc.w     $A824
  858.         EndM
  859.     ELSE
  860.         IMPORT    UTGetPathComponentName
  861.     ENDIF
  862.  
  863.     IF GENERATING68K THEN
  864.         Macro
  865.         _UTDetermineVol
  866.             moveq    #29,d0
  867.             dc.w     $A824
  868.         EndM
  869.     ELSE
  870.         IMPORT    UTDetermineVol
  871.     ENDIF
  872.  
  873.     IF GENERATING68K THEN
  874.         Macro
  875.         _UTGetBlock
  876.             moveq    #31,d0
  877.             dc.w     $A824
  878.         EndM
  879.     ELSE
  880.         IMPORT    UTGetBlock
  881.     ENDIF
  882.  
  883.     IF GENERATING68K THEN
  884.         Macro
  885.         _UTReleaseBlock
  886.             moveq    #32,d0
  887.             dc.w     $A824
  888.         EndM
  889.     ELSE
  890.         IMPORT    UTReleaseBlock
  891.     ENDIF
  892.  
  893.     IF GENERATING68K THEN
  894.         Macro
  895.         _UTFlushCache
  896.             moveq    #33,d0
  897.             dc.w     $A824
  898.         EndM
  899.     ELSE
  900.         IMPORT    UTFlushCache
  901.     ENDIF
  902.  
  903.     IF GENERATING68K THEN
  904.         Macro
  905.         _UTMarkDirty
  906.             moveq    #35,d0
  907.             dc.w     $A824
  908.         EndM
  909.     ELSE
  910.         IMPORT    UTMarkDirty
  911.     ENDIF
  912.  
  913.     IF GENERATING68K THEN
  914.         Macro
  915.         _UTTrashVolBlocks
  916.             moveq    #36,d0
  917.             dc.w     $A824
  918.         EndM
  919.     ELSE
  920.         IMPORT    UTTrashVolBlocks
  921.     ENDIF
  922.  
  923.     IF GENERATING68K THEN
  924.         Macro
  925.         _UTTrashFileBlocks
  926.             moveq    #37,d0
  927.             dc.w     $A824
  928.         EndM
  929.     ELSE
  930.         IMPORT    UTTrashFileBlocks
  931.     ENDIF
  932.  
  933.     IF GENERATING68K THEN
  934.         Macro
  935.         _UTTrashBlocks
  936.             moveq    #38,d0
  937.             dc.w     $A824
  938.         EndM
  939.     ELSE
  940.         IMPORT    UTTrashBlocks
  941.     ENDIF
  942.  
  943.     IF GENERATING68K THEN
  944.         Macro
  945.         _UTCacheReadIP
  946.             moveq    #39,d0
  947.             dc.w     $A824
  948.         EndM
  949.     ELSE
  950.         IMPORT    UTCacheReadIP
  951.     ENDIF
  952.  
  953.     IF GENERATING68K THEN
  954.         Macro
  955.         _UTCacheWriteIP
  956.             moveq    #40,d0
  957.             dc.w     $A824
  958.         EndM
  959.     ELSE
  960.         IMPORT    UTCacheWriteIP
  961.     ENDIF
  962.  
  963.     IF GENERATING68K THEN
  964.         Macro
  965.         _UTBlockInFQHashP
  966.             moveq    #44,d0
  967.             dc.w     $A824
  968.         EndM
  969.     ELSE
  970.         IMPORT    UTBlockInFQHashP
  971.     ENDIF
  972.  
  973. ;
  974. ; *    File System Manager call prototypes
  975.     ENDIF ; __FSM__
  976.